package com.dhgate.spu.analysis.bean;

import java.util.List;
import java.util.Set;


/** 
 * @author:      wangguodong 
 * @create:      2014-3-6 上午11:15:40 
 * @description: 抽取规则
 */
public class ExtractKeyword {
	private String[] sourceFieldNames;//要抽取的来源字段名称,多个的话以逗号分开
	private List<Set<String>> keywordSet;
	public String[] getSourceFieldNames() {
		return sourceFieldNames;
	}
	public void setSourceFieldNames(String[] sourceFieldNames) {
		this.sourceFieldNames = sourceFieldNames;
	}
	
	/**
	 * @return the keywordSet
	 */
	public List<Set<String>> getKeywordSet() {
		return keywordSet;
	}
	/**
	 * @param keywordSet the keywordSet to set
	 */
	public void setKeywordSet(List<Set<String>> keywordSet) {
		this.keywordSet = keywordSet;
	}
	//判断该规则是否可用
	public boolean isUsable(){
		if(sourceFieldNames==null||sourceFieldNames.length==0){
			return false;
		}
		if(keywordSet==null||keywordSet.size()==0){
			return false;
		}
		return true;
	}
	

}
